﻿@model EnterpriseFund.Model.DJ_NSRXX
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
    <title></title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)


    <script type="text/javascript">
        function OK() {
            if (FFinancePropNo.GetValue() != "") {
                form1.submit();
            }
            else {
                alert("请选择资金性质");
            }
        }

        $(document).ready(function () {
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
            }
            if (hdjsAlert == "操作成功") {
                parent.codeOK();
            }
            Changed2('F');

        });

        function Changed2(obj) {
            $.ajax({
                type: 'POST',
                url: rootPath + '/TaxPayerManager/GetList',
                data: { fEnterprisePropNo: ASPxClientComboBox.Cast("FEnterprisePropNo").GetValue() },
                success: function (result) {
                    ASPxClientComboBox.Cast("FFinancePropNo").ClearItems()
                    var List = JSON.parse(result);
                    for (var i = 0; i < List.length; i++) {
                        ASPxClientComboBox.Cast("FFinancePropNo").AddItem(List[i].FFinancePropShortName, List[i].FFinancePropNo, "");
                    }
                    if (obj == 'F') {
                        ASPxClientComboBox.Cast("FFinancePropNo").SetValue($("#hidFFinancePropNo").val());
                    }
                }
            });
        }

        function Changed() {
            $.ajax({
                type: 'POST',
                url: rootPath + '/TaxPayerManager/GetList',
                data: { fEnterprisePropNo: ASPxClientComboBox.Cast("FEnterprisePropNo").GetValue() },
                success: function (result) {
                    ASPxClientComboBox.Cast("FFinancePropNo").ClearItems()
                    var List = JSON.parse(result);
                    for (var i = 0; i < List.length; i++) {
                        ASPxClientComboBox.Cast("FFinancePropNo").AddItem(List[i].FFinancePropShortName, List[i].FFinancePropNo, "");
                    }
                }
            });
        }

    </script>

</head>
<body>

    @using (Html.BeginForm("PropSave", "TaxPayerManager", FormMethod.Post, new { id = "form1" }))
    {
    <table class="tableFrom">
        <tr>
            <th style=" width:150; text-align:right">
               纳税人名称:</th>
            <td>
            @Html.DevExpress().TextBox(settings =>
                   {
                       settings.Name = "NSRMC";
                       settings.Text = Model.NSRMC;
                       settings.Width = 370;
                       settings.ReadOnly = true;
                       settings.Properties.Style.ForeColor = System.Drawing.Color.Gray;
                       settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   }).GetHtml()
            </td>
        </tr>
        <tr>
            <th style=" width:150; text-align:right">
                纳税人编码:</th>
            <td>
            @Html.DevExpress().TextBox(settings =>
                   {
                       settings.Name = "NSRBM";
                       settings.Text = Model.NSRBM;
                       settings.Width = 370;
                       settings.ReadOnly = true;
                       settings.Properties.Style.ForeColor = System.Drawing.Color.Gray;
                       settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   }).GetHtml()
            </td>
        </tr>
              <tr>
            <th style=" width:150; text-align:right">
                纳税识别号:</th>
            <td>
            @Html.DevExpress().TextBox(settings =>
                   {
                       settings.Name = "NSRSBH";
                       settings.Text = Model.NSRSBH;
                       settings.Width = 370;
                       settings.ReadOnly = true;
                       settings.Properties.Style.ForeColor = System.Drawing.Color.Gray;
                       settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   }).GetHtml()
            </td>
        </tr>
        <tr>
            <th style=" width:150; text-align:right">
              企业性质:</th>
            <td>
                @Html.DevExpress().ComboBox(settings =>
           {
               settings.Name = "FEnterprisePropNo";
               settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
               settings.Properties.TextField = "FEnterprisePropName";
               settings.Properties.ValueField = "FEnterprisePropNo";
               settings.Width = 370;
               settings.Properties.ClientSideEvents.SelectedIndexChanged = "Changed";
           }).BindList(ViewData["EnterprisePropList"]).Bind(Model.FEnterprisePropNo).GetHtml()
            </td>
        </tr>
           <tr>
            <th style=" width:150; text-align:right">
              资金性质:</th>
            <td>
                 @Html.DevExpress().ComboBox(settings =>
            {
                settings.Name = "FFinancePropNo";
                settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                settings.Properties.TextField = "FFinancePropShortName";
                settings.Properties.ValueField = "FFinancePropNo";
                settings.Width = 370;
                settings.Properties.EnableClientSideAPI = true;
            }).Bind(Model.FFinancePropNo).GetHtml()
              
            </td>
        </tr>
           <tr>
            <th style=" width:150; text-align:right">
              国税纳税识别号:</th>
            <td>
                        @Html.DevExpress().TextBox(settings =>
                   {
                       settings.Name = "GS_NSRSBH";
                       settings.Text = Model.GS_NSRSBH;
                       settings.Width = 370;
                       settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   }).GetHtml()
            </td>
        </tr>
            <tr>
            <th style=" width:150; text-align:right">
              国税纳税人名称:</th>
            <td>
               @Html.DevExpress().TextBox(settings =>
          {
              settings.Name = "GS_NSRMC";
              settings.Text = Model.GS_NSRMC;
              settings.Width = 370;
              settings.Properties.ValidationSettings.EnableCustomValidation = true;
          }).GetHtml()
            </td>
        </tr>
    </table>
         @Html.Hidden("hidNSRDZDAH", ViewData["NSRDZDAH"])
                   @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]));
@Html.Hidden("hidFFinancePropNo", Model.FFinancePropNo)
    }
    <script>
        lp.Hide();
    </script>

</body>
</html>
